package org.projects.graduates.domain;

import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;

import org.apache.commons.lang3.builder.HashCodeBuilder;

import com.dayatang.domain.AbstractEntity;

/**
 * 每一次课程的内容
 * @author Administrator
 *
 */

@Entity
@Table(name = "contents")
public class Content extends AbstractEntity {

	private static final long serialVersionUID = 2473650729241770341L;
	
	@Lob
	private String txt;

	private String title;

	public int hashCode() {
		return new HashCodeBuilder(17, 37).append(this.getId()).toHashCode();
	}

	public boolean equals(Object other) {
		if (null == other) {
			return false;
		}
		if (other instanceof Content) {
			Content o = (Content) other;
			if (o.getId() == this.getId()) {
				return true;
			}
		}
		return false;
	}

	public String toString() {
		return "content : " + title;
	}

	public String getTxt() {
		return txt;
	}

	public void setTxt(String txt) {
		this.txt = txt;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

}
